import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue";
import path from "path";
// https://vitejs.dev/config/
export default defineConfig({
  plugins: [vue()],
  resolve: {
    alias: {
      // 设置路径 这里resolve和join可自行选用
      "~": path.resolve(__dirname, "./"),
      // 设置别名
      "@": path.resolve(__dirname, "./src"),
    },
    extensions: [".mjs", ".js", ".ts", ".jsx", ".tsx", ".json", ".vue"],
  },
  server: {
    open: true,
    host: "0.0.0.0",
    port: 5137,
    hmr: true,
    proxy: {
      "/api": {
        ws: false,
        target: "http://139.159.149.18:8086",
        changeOrigin: true,
      },
    },
  },
});
